# num = 100
#
# for i in range(1,num+1):
#     if i % 7 == 0 or ((i % 7) != 0 and str(i).count('7') > 0):
#         print(i, end=' ')

#打印菱形

hang = 9
for i in range(1,2*((hang-1)//2+1),2):
    print(("*" * i).center(hang))

for i in range(2*((hang-1)//2)-1, 0, -2):
    print(("*" * i).center(hang))

# #水仙花数
# for i in range(1,10000):
#     a = i % 10
#     b = i // 10 % 10
#     c = i // 100
#     if a ** 3 + b ** 3 + c ** 3 == i:
#         print(i)
#
# #打印完数
# def is_perfect_number(num):
#     # 计算正因子的和
#     divisors_sum = sum(i for i in range(1, num) if num % i == 0)
#     return divisors_sum == num
#
# # 打印小于10000的完数
# for i in range(1, 101):
#     if is_perfect_number(i):
#         print(i)

#
# #打印质数
# def is_prime(num):
#     if num < 2:
#         return False
#     for i in range(2, int(num ** 0.5) + 1):
#         if num % i == 0:
#             return False
#     return True
#
#
# def print_prime_numbers(limit):
#     for num in range(limit):
#         if is_prime(num):
#             print(num)


# 示例使用:
# print_prime_numbers(101)

#打印斐波那契数列
# def fibonacci(n):
#     a, b = 0, 1
#     for _ in range(n):
#         print(a, end="\n")
#         a, b = b, a + b
#
# fibonacci(50)


# def multiplication_table():
#     for i in range(1, 10):
#         for j in range(1, i + 1):
#             print(f"{j} * {i} = {i * j}", end='\t')
#         print()

# multiplication_table()
